package com.bj;

import java.util.List;

import com.casino.tool.P;

public class Rule {

	public static boolean isBlackJack(List<P> pList) {
		if (Strategy.count(pList) == 21 && pList.size() == 2) {
			return true;
		} else {
			return false;
		}
	}

	public static boolean isSurrenderAble(List<P> playerPList, P bankerP) {
//		return false;
		if (playerPList.size() == 2 && bankerP.getNum() != 14) {
			return true;
		} else {
			return false;
		}
	}

	public static boolean isDoubleAble(List<P> playerPList) {
		if (playerPList.size() == 2) {
			return true;
		} else {
			return false;
		}
	}

	public static boolean isSplitAble(List<P> playerPList, int spliteTimes) {
		if (playerPList.size() == 2 && playerPList.get(0).getNum() == playerPList.get(1).getNum() && spliteTimes <= 3) {
			return true;
		} else {
			return false;
		}
	}
}
